package com.you.pattern.decorator;

public class Main {
    public static void main(String[] args) {
        //买一个煎饼
        BatterCake batterCake = new BaseBatterCake();
        //加一个鸡蛋
        batterCake = new EggBatterCakeDecorator(batterCake);
        //在加一个鸡蛋
        batterCake = new EggBatterCakeDecorator(batterCake);
        //加一个香肠
        batterCake = new SuasageBatterCakeDecorator(batterCake);
        //最后看下多少钱
        System.out.println(batterCake.makeBatterCake() + "->" + batterCake.calculatePrice());
    }
}
